import { generateRandomString } from "./TestData"

export class FooObject {
  id: String = ""
  str1Value: String = ""
  str2Value: String = ""
  str3Value: String = ""
  str4Value: String = ""
  str5Value: String = ""
  str6Value: String = ""
  str7Value: String = ""
  str8Value: String = ""
  str9Value: String = ""
  str10Value: String = ""
  boolValue: boolean = false
  intValue: number = 0
  longValue: bigint = BigInt(0)
  doubleValue: number = 0.0
  fooValue?: FooObject
  listValue: Array<FooObject | null>
  mapValue: Map<string, FooObject | null>
  mapListValue: Map<string, Array<FooObject | null> | null> | null

  static build(
    id: String,
    str1Value: String = generateRandomString(10),
    boolValue: boolean = false,
    intValue: number = 0,
    longValue: bigint = BigInt(0),
    fooValue?: FooObject,
  ): FooObject {
    const foo = new FooObject()
    foo.id = id
    foo.str1Value = str1Value
    foo.boolValue = boolValue
    foo.intValue = intValue
    foo.longValue = longValue
    foo.fooValue = fooValue
    return foo
  }
}